home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************
- * QTAKE-I.H version 2.0
- *
- * Copyright Eastman Kodak Company, Inc. 1994 -1995, All Rights Reserved.
- *******************************************************************************/
-
- #ifndef __IMAGEPROCESSOR__
- #define __IMAGEPROCESSOR__
-
- #ifdef __cplusplus
- extern "C" { // Assume C declarations for C++
- #endif // __cplusplus
-
- #include <Windows.h>
-
- #define Boolean BOOL
- typedef short OSErr;
- typedef OSErr (FAR PASCAL *IpProgressProcPtr)( short msg,
- short percent,
- long refcon);
-
- // IPM Error Codes
- #define ERROR_BASE 10000
- #define noErr 0
- #define kIpNoMemoryError -620
- #define kIpAppCancel ERROR_BASE //10000
- #define kIpContextExistsError ERROR_BASE+1 //10001
- #define kIpNoContextExistsError ERROR_BASE+2 //10002
- #define kIpBadArgError ERROR_BASE+3 //10003
- #define kIpCancel ERROR_BASE+4 //10004
- #define kIpColorTablesNotCalculated ERROR_BASE+5 //10005
-
-
- // IPM Context Size
- #define kIPMContextSize 24306 //ipm context size. from 4096
- #define kIpDecompTableSize100 98 //ADPCM=98
- #define kIpDecompTableSize150 174 //RADC=174
-
- #define kIpColorMatrixSize 3*4*sizeof(double)
-
- // for progress callback (messages)
- #define IpProgressInit 0
- #define IpProgressUpdate 1
- #define IpProgressEnd 2
-
- typedef enum rotateAngle {
- kImgRot0 =0, // 0 degree rotation
- kImgRot90, // 90 degree rotation
- kImgRot180, // 180 degree rotation
- kImgRot270 // 270 degree rotation
- } RotateAngle;
-
- typedef enum pixelType {// output image format
- kGray8 = 0, // 8bit grayscale
- kDIB24 // 24bit RGB "BMP"
- } kIpPixelType;
-
-
- typedef enum compression{ // Matches the Picture Info Compression Mode
- kADPCM = 1, // QT100 compression
- kBitShiftA = 3, // QT100 thumbnail compression
- kRADC = 4, // QT150 compression
- kBitShiftB = 5 // QT150 thumbnail compression
- } IpCompression;
-
- typedef struct xyChroma {
- double xChroma;
- double yChroma;
- } XYChroma;
-
- typedef struct characteristics {// CRT display characteristics
- XYChroma redChroma; // Red phospher chromaticities
- XYChroma greenChroma; // Green phospher chromaticities
- XYChroma blueChroma; // Blue phospher chromaticities
- double gamma; // CRT color temprature, in Kelvins
- } Characteristics;
-
- typedef struct imageAttribute{
- unsigned short aImgWidth; // Horizontal size of image,in pixels
- unsigned short aImgLength; // Vertical size of image, in pixels
- IpCompression aCompressionType; // Compression Type of image
- kIpPixelType aPixelType; // Color or Grey; bits per pixel
- RotateAngle aAngle; // Rotation angle of output image
- unsigned short aStartingLine; // Start line number of output band
- unsigned short aLinesPerBand; // Number of full width lines in band
- Boolean firstBand; // Set to TRUE for first band of an image
- Boolean lastBand; // Set to TRUE to free working buffers
- } ImageAttribute;
-
- typedef struct progressCallBack {
- IpProgressProcPtr callBackProc; //Application progress callback proc
- long refcon; //Reference constant
- } ProgressCallBack;
-
- // Prototype declarations
- OSErr FAR PASCAL IpInitIPM(unsigned char far * ipm);
-
- OSErr FAR PASCAL IpEndIPM(unsigned char far * ipm);
-
- OSErr FAR PASCAL IpConvertThumbnailToRGB(
- unsigned char far * ipm,
- unsigned char far * pCompedTNail,
- unsigned char far * pTNailRGB,
- ImageAttribute far *imgAttr);
-
- OSErr FAR PASCAL IpConvertImageToRGB(
- unsigned char far * ipm,
- unsigned char huge * pCompedCDI,
- unsigned char huge * pRGB,
- ImageAttribute far * imgAttr,
- ProgressCallBack far * CallBackProc);
-
- OSErr FAR PASCAL IpGetDisplayCharacteristics(
- unsigned char far * ipm,
- Characteristics far * characteristics);
-
- OSErr FAR PASCAL IpSetDisplayCharacteristics(
- unsigned char far * ipm,
- Characteristics far * characteristics);
-
- OSErr FAR PASCAL IpInitDisplayCharacteristics(unsigned char far * ipm);
-
- OSErr FAR PASCAL IpGetCameraColorMatrix(
- unsigned char far * ipm,
- double far * cameraMatrix);
-
- OSErr FAR PASCAL IpSetCameraColorMatrix(
- unsigned char far * ipm,
- double far * cameraMatrix);
-
- OSErr FAR PASCAL IpInitCameraColorMatrix(unsigned char far * ipm);
-
-
- OSErr FAR PASCAL IpGetCompressionTable(
- unsigned char far * ipm,
- IpCompression compType,
- unsigned char far * decompTable);
-
- OSErr FAR PASCAL IpSetCompressionTable(
- unsigned char far * ipm,
- IpCompression compType,
- unsigned char far * decompTable);
-
- OSErr FAR PASCAL IpInitCompressionTable(
- unsigned char far * ipm,
- IpCompression compType);
- //
-
- OSErr FAR PASCAL IpCalculateColorTables(unsigned char far * ipm);
-
- #ifdef __cplusplus
- } /* End of extern "C" { */
- #endif /* __cplusplus */
-
- #endif /* __IMAGEPROCESSOR__ */
-
-